
export type ITaroEnv = 'weapp' | 'swan' | 'alipay' | 'tt' | 'qq' | 'jd' | 'h5' | 'app-plus'

export function select<T>(condition: Partial<Record<ITaroEnv, T>>):T | undefined {
    // ifdef MP-WEIXIN
    return condition['weapp']
    // endif
    // ifdef MP-ALIPAY
    return condition['alipay']
    // endif
    // ifdef H5
    return condition['h5']
    // endif
    // ifdef APP-PLUS
    return condition['app-plus']
    // endif
}
export default select